#include<iostream>
using namespace std;
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    long long n;
    cin>>n;
    long long  r[n];
    for(long long i=0;i<n;i++){
        cin>>r[i];
    }
    long long a[n];
    for(long long i=0;i<n;i++){
        a[i]=0;
    }
    for(long long i=1;i<=n;i++){
            if(r[i-1]!=r[i]){
                a[i]=r[i];
            }
            else{
                continue;
            }
    }
    long long s=0;
    for(long long i=1;i<=n;i++){
        if(a[i-1]!=a[i]&&a[i-1]<=a[i]){
                s++;
        }
        else{
            continue;
        }
    }
    int p=n-s+1;
    cout<<p<<endl;
    return 0;
}
